package top.oylan.mp.controller.home;

import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.oylan.mp.utils.Result;

import java.util.HashMap;
import java.util.Map;

@RestController
public class HomeController {

    @RequestMapping("/index")
    public Result index() {
        Result result = new Result();
        JSONObject jsonObject = new JSONObject();
//        jsonObject.put("touser","ok0eI5I-vBIHiAaY03S-FKciz8cQ");
        jsonObject.put("touser", "ohcBO5U5sW3o0lkBPc9W7oal_XJw");
        jsonObject.put("msgtype", "text");
        Map<String, String> map = new HashMap<>();
        map.put("content", "Hello man");
        jsonObject.put("text", map);
        return result;
    }
}
